/*
 * DAObject.h
 *
 *  Created on: 2013-1-31
 *      Author: Dspark
 */

#ifndef DAOBJECT_H_
#define DAOBJECT_H_

#include <cstdlib>
#include <qsettings.h>
#include <qsqldatabase.h>
#include <qsqlquery.h>
#include <qsqlrecord.h>
#include <qmessagebox.h>
#include <qfile.h>
#include <qstring.h>
#include <qdir.h>
#include <qlayout.h>
#include <qapplication.h>
#include <qsqlerror.h>
#include <qlabel.h>
#include <qlineedit.h>
#include "../bo/User.h"
#include <qapplication.h>
#include <qdebug.h>

class Login;

class DAObject : public QSettings{
public:
	explicit DAObject(const QString &corp, const QString &app);
	virtual ~DAObject();
	void init();
	QSqlDatabase& getDateBase();
	User user;
	void setServer();
friend class Login;
private:
	QSqlDatabase db;
};

extern DAObject Dao;

#endif /* DAOBJECT_H_ */
